import captchaSmsAdminApiConfig from '@/core/captchaSms/generated/apiconfig/captchaSmsAdminApiConfig'
import serverApiMockUtils from '../../utils/serverApiMockUtils'
import mockProdServerUtils from '../../utils/mockUtils'
import { MockMethod } from 'vite-plugin-mock'
import Mock from 'mockjs'
import CaptchaSmsApplicationExtendResponse from '@/core/captchaSms/generated/types/model/response/CaptchaSmsApplicationExtendResponse'

const content: CaptchaSmsApplicationExtendResponse[] = []
for (let i = 0; i < 10; i++) {
	content.push({
		id: i.toString(),
		captchaSmsAppId: i.toString(),
		captchaSmsItemConfigId: Mock.Random.integer(1, 2) == 1 ? null : i.toString(),
		smsAppId: Mock.Random.integer(1, 2) == 1 ? null : i.toString(),
		deleteFlag: '0',
		createTime: new Date().getTime().toString(),
		updateTime: new Date().getTime().toString(),
		rowVersion: 1,
	} as CaptchaSmsApplicationExtendResponse)
}

const mockList: MockMethod[] = [
	...serverApiMockUtils.getDefaultServerApi(captchaSmsAdminApiConfig.captchaSmsApplicationExtend, content),
]

mockProdServerUtils.addMockList(...mockList)

export const items = content
